package cn.felord.springboot.filters;

import lombok.extern.slf4j.Slf4j;

import javax.servlet.*;

/**
 * @author Felordcn
 * @since 10:31
 **/

@Slf4j
public class ResponseFilter extends AbstractFilterBean {

    public ResponseFilter(String... urlPatterns) {
        super(urlPatterns);
    }

    @Override
    public void internalHandler(ServletRequest request, ServletResponse response) {
        int remotePort = request.getRemotePort();

        log.info("remote port {}", remotePort);
    }

    @Override
    public int getOrder() {
        return -1;
    }
}
